package data;

import java.util.ArrayList;


/**
 * @author Besitzer
 *
 */
public class User {

	public boolean isAdmin = false;
	private int CPR;
	private int Pin;
	String FirstName, LastName;
	ArrayList<Account> accountList;


	public User(int CPR, int Pin, String FirstName, String LastName){
		this.CPR = CPR;
		this.Pin = Pin;
		this.FirstName = FirstName;
		this.LastName = LastName;

		accountList = new ArrayList<Account>();
	}

	// determines whether a user-specified PIN matches PIN in Account
	public boolean validatePIN( int userPIN )
	{
		if ( userPIN == Pin )
			return true;
		else
			return false;
	} // end method validatePIN


	public void addAccount(Account _account){
		this.accountList.add(_account);
	}

	public Account getSpecificAccount(int index){
		return accountList.get(index);
	}

	public void removeAccount(int remove)	{
		accountList.remove(remove);
	}	

	public int getCPR() {
		return CPR;
	}

	public int getPin() {
		return Pin;
	}

	public ArrayList<Account> getAccountList() {
		return accountList;
	}




}
